<?php
/**
 * Created by PhpStorm.
 * User: chang
 * Date: 16/3/24
 * Time: 下午4:48
 */

namespace Common\Base;


use Think\Controller;
use Think\Log;

class BaseController extends Controller
{

    protected function ajaxReturnWrap($data=null, $status = 0, $msg = '', $type = 'JSON', $json_option = 0)
    {
        $wap = [
            'data' => $data,
            'status' => $status,
            'msg'=> $msg
        ];

        header("Access-Control-Allow-Origin:*");
        header('Content-Type:application/json; charset=utf-8');

        exit(json_encode($wap));
    }
}


